﻿using System.Collections.Generic;
using System.IO;
using Nop.Core.Domain.Catalog;
using Nop.Core.Domain.Localization;
using Nop.Core.Domain.Logistics;
using Nop.Core.Domain.Orders;
using Nop.Core.Domain.Shipping;
using Nop.Services.Orders;

namespace Nop.Services.Common
{
    /// <summary>
    /// Customer service interface
    /// </summary>
    public partial interface IPdfService
    {
        /// <summary>
        /// Print an order to PDF
        /// </summary>
        /// <param name="stream">Stream</param>
        /// <param name="orders">Orders</param>
        /// <param name="lang">Language</param>
        void PrintOrdersToPdf(Stream stream, IList<Order> orders, Language lang);

        /// <summary>
        /// Print an invoice to PDF
        /// </summary>
        /// <param name="stream">Stream</param>
        /// <param name="invoice">Invoice</param>
        /// <param name="lang">Language</param>
        /// <param name="useCustomerTimeZone">Use cutomer time zone info. true to use customer info instead of invoice time zone</param>
        void PrintInvoiceToPdf(Stream stream, Invoice invoice, Language lang, bool useCustomerTimeZone = false);

        /// <summary>
        /// Print a list of invoices to PDF
        /// </summary>
        /// <param name="stream">Stream</param>
        /// <param name="invoices">Invoices</param>
        /// <param name="lang">Language</param>
        /// <param name="useCustomerTimeZone">Use cutomer time zone info. true to use customer info instead of invoice time zone</param>
        void PrintInvoiceToPdf(Stream stream, IList<Invoice> invoices, Language lang, bool useCustomerTimeZone = false);

        /// <summary>
        /// Print packaging slips to PDF
        /// </summary>
        /// <param name="stream">Stream</param>
        /// <param name="shipments">Shipments</param>
        /// <param name="lang">Language</param>
        void PrintPackagingSlipsToPdf(Stream stream, IList<Shipment> shipments, Language lang);


        /// <summary>
        /// Print product collection to PDF
        /// </summary>
        /// <param name="stream">Stream</param>
        /// <param name="products">Products</param>
        /// <param name="lang">Language</param>
        void PrintProductsToPdf(Stream stream, IList<Product> products, int regionId, Language lang);

        /// <summary>
        /// Print logistics locations to PDF
        /// </summary>
        /// <param name="stream">Stream</param>
        /// <param name="locations">Logistics locations</param>
        /// <param name="trackingUrls">List of Package tracking urls corresponding to Logistcs locations</param>
        /// <param name="plannedRouteUrl">Url corresponding to the Planned Route List</param>
        /// <param name="lang">Language</param>
        void PrintLogistcsLocationsToPdf(Stream stream, IList<LogisticsLocation> locations, IList<string> trackingUrls,
                                         string plannedRouteUrl, Language lang);

        /// <summary>
        /// Print logistics waybill to PDF
        /// </summary>
        /// <param name="stream">Stream</param>
        /// <param name="package">Logistics package</param>
        /// <param name="trackingUrl">Package tracking url string</param>
        /// <param name="lang">Language</param>
        void PrintLogisticsWaybillToPdf(Stream stream, LogisticsPackage package, string trackingUrl, Language lang);

        /// <summary>
        /// Print logistics waybill to PDF
        /// </summary>
        /// <param name="stream">Stream</param>
        /// <param name="package">Logistics package</param>
        /// <param name="trackingUrl">Package tracking url string</param>
        /// <param name="lang">Language</param>
        /// <param name="isisReturnRequestLogisticOrder">add return to shipping lable</param>
        void PrintLogisticsWayBillToPdfWithReturn(Stream stream, LogisticsPackage package, string trackingUrl,
            Language lang, bool isisReturnRequestLogisticOrder);

        /// <summary>
        /// Print logistics waybills for a list of packages to one PDF
        /// </summary>
        /// <param name="stream">Stream</param>
        /// <param name="packages">List of Logistics packages</param>
        /// <param name="trackingUrls">List of Packages' tracking url strings</param>
        /// <param name="lang">Language</param>
        void PrintLogisticsWaybillToPdf(Stream stream, IList<LogisticsPackage> packages, IList<string> trackingUrls, Language lang);

        /// <summary>
        /// /
        /// </summary>
        /// <param name="stream"></param>
        void PrintPacking(Stream stream, PrintPackingModel packingPackingModel);

        /// <summary>
        /// Print picking to PDF
        /// </summary>
        /// <param name="stream">stream</param>
        /// <param name="variants">list of product varians</param>
        /// <param name="lang">language</param>
        /// <param name="orderId">order id</param>
        void PrintPickingToPdf(Stream stream, List<PdfPackagePickingInfo> variants, Language lang, int orderId);

        /// <summary>
        /// Print Message Labels to PDF
        /// </summary>
        /// <param name="stream">stream</param>
        /// <param name="checkoutAttributes">gift message </param>
        /// <param name="language">language</param>
        void PrintMessageLabelToPdf(Stream stream, Dictionary<string, string> checkoutAttributes, Language language);
    }
}